﻿using Ledict.ConditionExtract.Common;
using Ledict.ConditionExtract.Model;
using Ledict.Core.Data;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ledict.ConditionExtract.DAL
{
  public  class SYS_DisputeStructureDAL
    {
        private string DbName;
        public SYS_DisputeStructureDAL()
        {
            DbName = "JudgeDoc";
        }

        /// <summary>
        /// 获取矛盾纠纷结构表数据
        /// </summary>
        /// <param name="ccid">节点信息</param>
        /// <returns></returns>
        public DataTable GetDisputeStructureData()
        {
            string sql = " select DS_CaseCauseID from SYS_DisputeStructure ";
            Database oBase = DatabaseFactory.CreateDatabase(DbName);
            DbCommand oCmd = oBase.GetSqlStringCommand(sql.ToString());
            var otB = oBase.ExecuteDataSet(oCmd).Tables[0];
            if (otB.Rows.Count > 0)
            {
                return otB;
            }
            return new DataTable();
        }


    }
}
